<?php
/**
* SocialEngine
*
* @category   Application_Core
* @package    Core
* @copyright  Copyright 2006-2010 Webligo Developments
* @license    http://www.socialengine.net/license/
* @author     Jung
*/

/**
* @category   Application_Core
* @package    Core
* @copyright  YouNet Solution
* @license    http://www.socialengine.net/license/
*/
class Wall_Form_Uploadphoto extends Engine_Form
{
    public function init()
    {
        // Set form attributes
    $this->setTitle('Upload photo');
    $this->setDescription('Follow this guide to upload a photo to your comment');
    $this->setAttrib('id', 'form-upload');
    $this->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));

    $fancyUpload = new Engine_Form_Element_FancyUpload('file');
    $fancyUpload->clearDecorators()
                ->addDecorator('FormFancyUpload')
                ->addDecorator('viewScript', array(
                  'viewScript' => '_FancyUpload.tpl',
                  'placement'  => '',
                  ));
    Engine_Form::addDefaultDecorators($fancyUpload);
    $fancyUpload->setLabel("Upload User Image");
    $this->addElement($fancyUpload);
    $this->addElement('Hidden', 'photo_id');

    $this->addDisplayGroup(array('file'), 'upload_image');
    $upload_image_group = $this->getDisplayGroup('upload_image');
    }
}
